home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
DOS_UNIX.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
327 b
|
19 lines
#include <dos.h>
#include <time.h>
main()
{
struct date date;
struct time time;
time_t tunix;
/* Get date and time from DOS */
getdate(&date);
gettime(&time);
/* Convert to UNIX format */
tunix = dostounix(&date, &time);
/* Print the date and time using 'ctime' */
printf("%s\n", ctime(&tunix));
}